import VueRouter from 'vue-router'

//导入对应的路由组件
import HomeberContainer from './components/tabbar/HomeberContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'

import BewsList from './components/news/BewsList.vue'
import Newsinfo from './components/news/Newsinfo.vue'

import PhotoList from './components/photos/PhotoList.vue'
import PhotoInfo from './components/photos/photoinfo.vue'

import GoodsList from './components/GoodsList/GoodsList.vue'
import GoodsInfo from './components/GoodsList/Goodsinfo.vue'
import GoodsComment from './components/GoodsList/GoodsComment.vue'
import GoodsDesc from './components/GoodsList/GoodsDesc.vue'

import HomeComments from './components/HomeComment/HomeComment.vue'
// 3,创建路由对象
var router = new VueRouter({
    // roure  //这个配置对象中的route表示 【路由匹配规则】 的意思
    routes: [
        {path:'/',redirect:'/home'},
       {path:'/home',component:HomeberContainer},
       {path:'/member',component:MemberContainer},
       {path:'/shopcar',component:ShopcarContainer},
       {path:'/search',component:SearchContainer},

       {path:'/home/newslist',component:BewsList},
       {path:'/home/Newsinfo/:id',component:Newsinfo},

       {path:'/home/photolist',component:PhotoList},
       {path:'/home/photoinfo/:id',component:PhotoInfo},

       {path:'/home/goodslist',component:GoodsList},
       {path:'/home/goodsinfo/:id',component:GoodsInfo,name:"goodsinfo"},

       {path:'/home/goodscomment/:id',component:GoodsComment,name:"goodscomment"},
       {path:'/home/goodsdesc/:id',component:GoodsDesc,name:"goodsdesc"},

       {path:'/home/comments/',component:HomeComments,name:"homecomments"},

    ],
    linkActiveClass:'mui-active'//覆盖默认的路由高亮的类,默认的类叫做router-link-active
})


export default router